package androidx.fragment.app;

import android.content.res.Configuration;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;

import androidx.annotation.NonNull;

public class MyFragmentManager extends FragmentManager {

    @Override
    void dispatchStart() {
        try {
            super.dispatchStart();
        } catch (Throwable e) {
            e.printStackTrace();
        }
    }

    @Override
    void dispatchCreate() {
        try {
            super.dispatchCreate();
        } catch (Throwable e) {
            e.printStackTrace();
        }
    }

    @Override
    void dispatchActivityCreated() {
        try {
            super.dispatchActivityCreated();
        } catch (Throwable e) {
            e.printStackTrace();
        }
    }

    @Override
    void dispatchResume() {
        try {
            super.dispatchResume();
        } catch (Throwable e) {
            e.printStackTrace();
        }
    }

    @Override
    void dispatchPause() {
        try {
            super.dispatchPause();
        } catch (Throwable e) {
            e.printStackTrace();
        }
    }

    @Override
    public void dispatchStop() {
        try {
            super.dispatchStop();
        } catch (Throwable e) {
            e.printStackTrace();
        }
    }

    @Override
    void dispatchDestroyView() {
        try {
            super.dispatchDestroyView();
        } catch (Throwable e) {
            e.printStackTrace();
        }
    }

    @Override
    void dispatchDestroy() {
        try {
            super.dispatchDestroy();
        } catch (Throwable e) {
            e.printStackTrace();
        }
    }

    @Override
    void dispatchMultiWindowModeChanged(boolean isInMultiWindowMode, boolean bo) {
        try {
            super.dispatchMultiWindowModeChanged(isInMultiWindowMode, bo);
        } catch (Throwable e) {
            e.printStackTrace();
        }
    }

    @Override
    void dispatchPictureInPictureModeChanged(boolean isInPictureInPictureMode, boolean bo) {
        try {
            super.dispatchPictureInPictureModeChanged(isInPictureInPictureMode, bo);
        } catch (Throwable e) {
            e.printStackTrace();
        }
    }

    @Override
    void dispatchConfigurationChanged(@NonNull Configuration newConfig, boolean bo) {
        try {
            super.dispatchConfigurationChanged(newConfig, bo);
        } catch (Throwable e) {
            e.printStackTrace();
        }
    }

    @Override
    void dispatchLowMemory(boolean bo) {
        try {
            super.dispatchLowMemory(bo);
        } catch (Throwable e) {
            e.printStackTrace();
        }
    }

    @Override
    boolean dispatchCreateOptionsMenu(@NonNull Menu menu, @NonNull MenuInflater inflater) {
        try {
            return super.dispatchCreateOptionsMenu(menu, inflater);
        } catch (Throwable e) {
            e.printStackTrace();
        }
        return false;
    }

    @Override
    boolean dispatchPrepareOptionsMenu(@NonNull Menu menu) {
        try {
            return super.dispatchPrepareOptionsMenu(menu);
        } catch (Throwable e) {
            e.printStackTrace();
        }
        return false;
    }

    @Override
    boolean dispatchOptionsItemSelected(@NonNull MenuItem item) {
        try {
            return super.dispatchOptionsItemSelected(item);
        } catch (Throwable e) {
            e.printStackTrace();
        }
        return false;
    }

    @Override
    boolean dispatchContextItemSelected(@NonNull MenuItem item) {
        try {
            return super.dispatchContextItemSelected(item);
        } catch (Throwable e) {
            e.printStackTrace();
        }
        return false;
    }

    @Override
    void dispatchOptionsMenuClosed(@NonNull Menu menu) {
        try {
            super.dispatchOptionsMenuClosed(menu);
        } catch (Throwable e) {
            e.printStackTrace();
        }
    }

    boolean execPendingActions(boolean allowStateLoss) {
        try {
            return super.execPendingActions(allowStateLoss);
        } catch (Throwable e) {
            e.printStackTrace();
        }
        return false;
    }
}
